package main

import "fmt"

func main() {

	var arr = []int{6,7,8,9,1,2,3,5}
	left :=0
	right := len(arr)-1
	if left < right {
		mid := left + (right-left)/2
		if arr[mid] > arr[right] {
			left = mid + 1
		}else {
			right = mid
		}
	}
	fmt.Println(arr[left])
}


